<?php defined('IN_PHPCMS') or exit('Access Denied'); ?><?php include template("member","header"); ?>
<div id="main"> 
<?php include template("ads","left"); ?>
  <div id="right">
   <p id="position"><strong>当前位置：</strong><a href="">首页</a><a href="<?php echo $M['url'];?>member.php">我的广告</a>广告管理</p>
    <form method="post" name="myform">
    <table cellpadding="0" cellspacing="1" class="table_list">  
      <caption>
      广告管理
      </caption>
      <tr>
        <th width="5%">选中</th>
        <th width="*">广告名称</th>
        <th width="10%">起始日期</th>
        <th width="10%">结束日期</th>
        <th width="6%">审核</th>
        <th width="7%">状态</th>
        <th width="9%">操作</th>
        <th width="9%">统计</th>
      </tr>
      <?php if(is_array($adses)) foreach($adses AS $i => $ads) { ?>
      <tr>
        <td><input type="checkbox" name="adsid[]" id="adsid[]" value="<?php echo $ads['adsid'];?>"></td>
        <td class="align_left">&nbsp;<a href="<?php echo $M['url'];?>member.php?action=view&adsid=<?php echo $ads['adsid'];?>" target="_blank"><?php echo $ads['adsname'];?></a></td>
        <td class="align_c"><?php echo date('Y-m-d', $ads[fromdate]);?></td>
        <td class="align_c"><?php echo date('Y-m-d', $ads[todate]);?></td>
        <td class="align_c"><?php if($ads['passed']) { ?><font color="#00ee00">通过</font><?php } else { ?><font color="#ee0000">未通过</font><?php } ?></td>
        <td class="align_c"><?php if($ads['status']) { ?><font color="#00ee00">正常</font><?php } else { ?><font color="#ee0000">关闭</font><?php } ?></td>
        <td class="align_c"><a href="<?php echo $M['url'];?>member.php?action=edit&adsid=<?php echo $ads['adsid'];?>">修改</a> </td>
        <td class="align_c"><a href="<?php echo $M['url'];?>stat.php?adsid=<?php echo $ads['adsid'];?>">统计</a> </td>
      </tr>
      <?php } ?>
    </table>
<div class="button_box">
          <span style="cursor:pointer;" onclick="javascript:$('input[type=checkbox]').attr('checked', true);" >全选</span>/<span style="cursor:pointer;" onclick="javascript:$('input[type=checkbox]').attr('checked', false)" >取消</span>&nbsp;&nbsp;
          <input type="submit" name="submit" value="批量关闭" onClick="myform.action='<?php echo $M['url'];?>member.php?action=status&val=0'">
          &nbsp;&nbsp;
          <input type="submit" name="submit" value="批量取消关闭" onClick="myform.action='<?php echo $M['url'];?>member.php?action=status&val=1'">
          &nbsp;&nbsp;
          <input type="submit" name="submit" value="批量删除" onClick="myform.action='<?php echo $M['url'];?>member.php?action=delete'">
</div>
    </form>
    <div id="pages"><?php echo $pages;?></div>
  </div>
</div>
<?php include template('phpcms','footer'); ?>